using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using emp.ProcessFlow;
using emp.BLL;
using emp.Model;

public partial class crm_quest_QuestionColumnAliasPopUp : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            // If that data is not in the cache then use the business logic tier to fetch the data
            Quest quest = new Quest();
            IList questfieldarraylist = quest.GetFiledColumnAliasList ();
            // Store the results in a cache

            questAliasList.DataSource = questfieldarraylist;


            // Databind the data to the controls
            questAliasList.DataBind();

            for (int i = 0; i < questAliasList.Items.Count; i++)
            {
                QuestColumnAliasInfo questAliasInfo = (QuestColumnAliasInfo)questfieldarraylist[i];
                Label fieldName = (Label)questAliasList.Items[i].FindControl("lblfieldname");
                Literal labAliasName = (Literal)questAliasList.Items[i].FindControl("labAliasName");
                Literal LabCheckbox = (Literal)questAliasList.Items[i].FindControl("LalCheckBox");
                string questStatus = questAliasInfo.QCA_FIELD_STATUS;
                string questAliasName = questAliasInfo.QCA_ALIAS_NAME;
                if (questStatus.EndsWith("Y"))
                {
                    labAliasName.Text = "<input id='columnAlias' type='text'  disabled value='" + questAliasInfo.QCA_ALIAS_NAME+ "'  />";
                    LabCheckbox.Text = "<input id='QFS_CHECKBOX' type='checkbox' disabled checked value='" + questAliasInfo.QCA_FIELD_NAME + "'  />";
                }
                else
                {
                    labAliasName.Text = "<input id='columnAlias' type='text' value=''  />";
                    LabCheckbox.Text = "<input id='QFS_CHECKBOX' type='checkbox'   value='" + questAliasInfo.QCA_FIELD_NAME + "'  />";
                }
                //Literal LalHidAliasName = (Literal)questAliasList.Items[i].FindControl("LalHidAliasName");
                //LalHidAliasName.Text = "<input type=hidden id='qcaAliasName" + i + "' value='" + questAliasName + "'";
            }

        }
    }

  
    }

